home *** CD-ROM | disk | FTP | other *** search
/ Trusted Irix /B 4.0.4 / Trusted-Irix B-4.0.1.iso / dist / eoe1.idb / usr / include / sys / ptrace.h.z / ptrace.h
C/C++ Source or Header  |  1992-04-03  |  4KB  |  110 lines

  1. /**************************************************************************
  2.  *                                      *
  3.  *          Copyright (C) 1990, Silicon Graphics, Inc.          *
  4.  *                                      *
  5.  *  These coded instructions, statements, and computer programs  contain  *
  6.  *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
  7.  *  are protected by Federal copyright law.  They  may  not be disclosed  *
  8.  *  to  third  parties  or copied or duplicated in any form, in whole or  *
  9.  *  in part, without the prior written consent of Silicon Graphics, Inc.  *
  10.  *                                      *
  11.  **************************************************************************/
  12. /*
  13.  * Copyright 1985 by MIPS Computer Systems, Inc.
  14.  */
  15. #ifndef __SYS_PTRACE_H__
  16. #define __SYS_PTRACE_H__
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. #ident    "$Revision: 3.11 $"
  23.  
  24. /*
  25.  * ptrace.h -- definitions for use with ptrace() system call
  26.  */
  27.  
  28. /*
  29.  * ptrace request numbers
  30.  */
  31. #define    PTRC_SELFTRACE    0        /* enable tracing on this process */
  32. #define    PTRC_RD_I    1        /* read user I space */
  33. #define    PTRC_RD_D    2        /* read user D space */
  34. #define    PTRC_RD_REG    3        /* read user registers */
  35. #define    PTRC_WR_I    4        /* write user I space */
  36. #define    PTRC_WR_D    5        /* write user D space */
  37. #define    PTRC_WR_REG    6        /* write user registers */
  38. #define    PTRC_CONTINUE    7        /* continue, possibly with signal */
  39. #define    PTRC_TERMINATE    8        /* terminate traced process */
  40. #define    PTRC_STEP    9        /* single step traced process */
  41.  
  42. /* special extentions to ptrace */
  43. #define    PTRC_RD_GPRS    21        /* read all user gp registers */
  44. #define    PTRC_RD_FPRS    22        /* read all user fp registers */
  45. #define    PTRC_WR_GPRS    24        /* read all user gp registers */
  46. #define    PTRC_WR_FPRS    25        /* read all user fp registers */
  47.  
  48. /*
  49.  * register number definitions for PTRC_RD_REG's and PTRC_WR_REG's
  50.  */
  51. #define GPR_BASE    0            /* general purpose regs */
  52. #define    NGP_REGS    32            /* number of gpr's */
  53.  
  54. #define FPR_BASE    (GPR_BASE+NGP_REGS)    /* fp regs */
  55. #define    NFP_REGS    32            /* number of fp regs */
  56.  
  57. #define    SIG_BASE    (FPR_BASE+NFP_REGS)    /* sig handler addresses */
  58. #define    NSIG_HNDLRS    32            /* number of signal handlers */
  59.  
  60. #define SPEC_BASE    (SIG_BASE+NSIG_HNDLRS)    /* base of spec purpose regs */
  61. #define PC        SPEC_BASE+0        /* program counter */
  62. #define    CAUSE        SPEC_BASE+1        /* cp0 cause register */
  63. #define    BADVADDR    SPEC_BASE+2        /* bad virtual address */
  64. #define MMHI        SPEC_BASE+3        /* multiply high */
  65. #define MMLO        SPEC_BASE+4        /* multiply low */
  66. #define FPC_CSR        SPEC_BASE+5        /* fp csr register */
  67. #define FPC_EIR        SPEC_BASE+6        /* fp eir register */
  68. #define NSPEC_REGS    7            /* number of spec registers */
  69. #define NPTRC_REGS    (SPEC_BASE + NSPEC_REGS)
  70.  
  71. /* 
  72.  * The registers above are made available to user debuggers 
  73.  * (e.g. via core files). Additional special registers 
  74.  * defined for use by symmon's rdebug follow.
  75.  */
  76. #define SR        SPEC_BASE+7        /* status register */
  77. #define TLBHI        SPEC_BASE+8        /* tlb hi */
  78. #define TLBLO        SPEC_BASE+9        /* tlb lo */
  79. #define INX        SPEC_BASE+10        /* tlb index */
  80. #define RAND        SPEC_BASE+11        /* tlb random */
  81. #define CTXT        SPEC_BASE+12        /* context */
  82. #define EXCTYPE        SPEC_BASE+13        /* exception type */
  83. #if R4000
  84. #define TLBLO1        SPEC_BASE+14        /* tlb lo1 */
  85. #define PGMSK        SPEC_BASE+15        /* page mask */
  86. #define WIRED        SPEC_BASE+16        /* tlb wired */
  87. #define COUNT        SPEC_BASE+17        /* count */
  88. #define COMPARE        SPEC_BASE+18        /* compare */
  89. #define LLADDR        SPEC_BASE+19        /* load linked address */
  90. #define WATCHLO        SPEC_BASE+20        /* data watchpoint lo */
  91. #define WATCHHI        SPEC_BASE+21        /* data watchpoint hi */
  92. #define ECC        SPEC_BASE+22        /* ecc information */
  93. #define CACHERR        SPEC_BASE+23        /* cache error */
  94. #define TAGLO        SPEC_BASE+24        /* cache tag lo */
  95. #define TAGHI        SPEC_BASE+25        /* cache tag hi */
  96. #define ERREPC        SPEC_BASE+26        /* cache error epc */
  97. #endif /* R4000 */
  98.  
  99. #ifdef _KERNEL
  100. extern int ptrace(void);
  101. #else
  102. extern int ptrace(int, ...);
  103. #endif
  104.  
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108.  
  109. #endif /* __SYS_PTRACE_H__ */
  110.